import React from 'react'

class Denglu extends React.Component {
  constructor(props) {
    super(props)
    this.state = {}
  }
  render () {
      return(
          <div>
              <input type="text" placeholder="请输入内容" ref="input" onKeyDown={(e)=>{
                  if(e.keyCode==13){
                      if(this.refs.input.value.length>0){
                        this.props.history.push('/')
                      }else{
                          alert('请随便输入进行登录')
                      }
                     
                  }
              }}/>

          </div>

      )
   
  }
}

export default Denglu